/*
using MyGeneration/Template/NHibernate (c) by lujan99@usa.net
*/
using System;
using System.Collections;
using System.Collections.Generic;

namespace Rodunu.Movies.Contracts
{
	/// <summary>
	/// Movie object for NHibernate mapped table 'Movie'.
	/// </summary>
	[Serializable]
	public class Movie : IIdentifier
	{

        #region Member Variables
        protected long _id;
        protected string _name;
        protected int _mpaaratingid;
        protected DateTime _dateadded;
        protected DateTime _lastmodified;
        protected string _studio;
        protected DateTime? _released;
        protected string _status;
        protected string _sound;
        protected string _versions;
        protected double _price;
        protected string _rating;
        protected string _year;
        protected string _genre;
        protected string _aspect;
        protected long? _upc;
        protected DateTime? _dvdreleasedate;
        protected long? _dbid;
        protected DateTime? _timestamp;
        protected IList<UserMovies> _usermovies;
        #endregion
        #region Constructors

        public Movie() { }

        public Movie(string name, int mpaaratingid, DateTime dateadded, DateTime lastmodified, string studio, DateTime? released, string status, string sound, string versions, double price, string rating, string year, string genre, string aspect, long? upc, DateTime? dvdreleasedate, long? dbid, DateTime? timestamp)
        {
            this._name = name;
            this._mpaaratingid = mpaaratingid;
            this._dateadded = dateadded;
            this._lastmodified = lastmodified;
            this._studio = studio;
            this._released = released;
            this._status = status;
            this._sound = sound;
            this._versions = versions;
            this._price = price;
            this._rating = rating;
            this._year = year;
            this._genre = genre;
            this._aspect = aspect;
            this._upc = upc;
            this._dvdreleasedate = dvdreleasedate;
            this._dbid = dbid;
            this._timestamp = timestamp;
        }

        #endregion
        #region Public Properties
        public virtual long Id
        {
            get { return _id; }
            set { _id = value; }
        }
        public virtual string Name
        {
            get { return _name; }
            set { _name = value; }
        }
        public virtual int MpaaRatingId
        {
            get { return _mpaaratingid; }
            set { _mpaaratingid = value; }
        }
        public virtual DateTime DateAdded
        {
            get { return _dateadded; }
            set { _dateadded = value; }
        }
        public virtual DateTime LastModified
        {
            get { return _lastmodified; }
            set { _lastmodified = value; }
        }
        public virtual string Studio
        {
            get { return _studio; }
            set { _studio = value; }
        }
        public virtual DateTime? Released
        {
            get { return _released; }
            set { _released = value; }
        }
        public virtual string Status
        {
            get { return _status; }
            set { _status = value; }
        }
        public virtual string Sound
        {
            get { return _sound; }
            set { _sound = value; }
        }
        public virtual string Versions
        {
            get { return _versions; }
            set { _versions = value; }
        }
        public virtual double Price
        {
            get { return _price; }
            set { _price = value; }
        }
        public virtual string Rating
        {
            get { return _rating; }
            set { _rating = value; }
        }
        public virtual string Year
        {
            get { return _year; }
            set { _year = value; }
        }
        public virtual string Genre
        {
            get { return _genre; }
            set { _genre = value; }
        }
        public virtual string Aspect
        {
            get { return _aspect; }
            set { _aspect = value; }
        }
        public virtual long? Upc
        {
            get { return _upc; }
            set { _upc = value; }
        }
        public virtual DateTime? DvdReleaseDate
        {
            get { return _dvdreleasedate; }
            set { _dvdreleasedate = value; }
        }
        public virtual long? Dbid
        {
            get { return _dbid; }
            set { _dbid = value; }
        }
        public virtual DateTime? Timestamp
        {
            get { return _timestamp; }
            set { _timestamp = value; }
        }
        public virtual IList<UserMovies> UserMovies
        {
            get { return _usermovies; }
            set { _usermovies = value; }
        }

        public virtual String AmazonASIN { get; set; }
        public virtual String NetflixId { get; set; }
        public virtual String SmallImageUrl { get; set; }
        public virtual String LargeImageUrl { get; set; }
        #endregion

        #region Equals And HashCode Overrides
        /// <summary>
        /// local implementation of Equals based on unique value members
        /// </summary>
        public override bool Equals(object obj)
        {
            if (this == obj) return true;
            if ((obj == null) || (obj.GetType() != this.GetType())) return false;
            Movie castObj = (Movie)obj;
            return (castObj != null) &&
            this._id == castObj.Id;
        }
        /// <summary>
        /// local implementation of GetHashCode based on unique value members
        /// </summary>
        public override int GetHashCode()
        {
            int hash = 57;
            hash = 27 * hash * _id.GetHashCode();
            return hash;
        }
        #endregion
		
	}
}
